#ifndef CONFIGUI_H
#define CONFIGUI_H

#include <QPushButton>
#include <QWidget>
#include <QLineEdit>
#include <QComboBox>
#include <QTableWidget>
#include <QLabel>
#include <QCheckBox>
class ConfigUI : public QWidget
{
    Q_OBJECT
public:
    explicit ConfigUI(QWidget *parent = 0);

protected:
    bool eventFilter(QObject *watched, QEvent *event);
private:
    QLabel          *m_labelSpeed;
    QLineEdit       *m_speedValue;
    QLabel          *m_labelTestNo;
    QLabel          *m_labelDutNo;
    QLineEdit       *m_TesterNo;
    QLineEdit       *m_DutNo;
    QLabel          *m_labelSpecName;
    QLabel          *m_labelMM;
    QLabel          *m_labelN;
    QLabel          *m_labelAWG;
    QLabel          *m_labelSpc;
    QComboBox       *m_combo;
    QTableWidget    *m_tableWidget;
    QLineEdit       *m_lineEditSpecNme;
    QLineEdit       *m_lineEditMM;
    QLineEdit       *m_lineEditAWG;
    QLineEdit       *m_lineEditN;
    QPushButton     *m_addCsvBtn;
    QCheckBox       *m_NewChkBtn;
    QMap<QString,QVector<QString>> m_csvData;
    bool            m_changeSpc;
    int             m_iLanguageType;
signals:
    void            CallKeyBoard(const QString&,int);
public slots:
    QTableWidget    *CreateTableWidget();
    void            InsertData(QVector<QString> vec,QString );
    void            LoadCsv();
    void            ReceiveKeyBoardData(const QString&,const QString&);
    void            ChangeLanguage(int);
private slots:
    void            DistributeCsvData(const QString &name);
    void            AddDataToCsv();
    void            UserClickListener(QModelIndex);
    void            GetLineEditDatas(const QString&);
    void            OnBtnClicked();
    void            StatusChanged(int);
private:
    void            SetSpeedCmd(unsigned int c);
};

#endif // CONFIGUI_H
